import service from "@/request/index";

interface loginData {
    username: string,
    password: string
}

export class LoginView { //登录接口
    public login(data: loginData) {
        return service({
            url: "/login",
            method: "POST",
            data
        })
    }
}

export class GoodList { //商品列表接口
    public getGoodsList() {
        return service({
            url: '/getGoodsList',
            method: 'GET'
        })
    }
}

export class UserList { //用户列表接口
    public getUserList() {
        return service({
            url: '/getUserList',
            method: 'get'
        })
    }
}

export class RoleList { //角色列表接口
    public getRoleList() {
        return service({
            url: '/getRoleList',
            method: 'get'
        })
    }
}

export class AuthorityList { //权限列表接口
    public getAuthorityList() {
        return service({
            url: '/getAuthorityList',
            method: 'get'
        })
    }
}
